#pragma once
#include "probabilitydistribution.h"
#include "VGFAsympExp.h"
#include "VGQuantileBounds.h"


class VarianceGammaDistribution :
	public ProbabilityDistribution
{
public:
	VarianceGammaDistribution(double mu, double lambda, double alpha, double beta);
	~VarianceGammaDistribution(void);

	double density(double t) const;
	double cdf(double x);
	double probability(double a, double b);
	std::pair<double,double> quantileBounds(double u) const;
	std::pair<double,double> getSupport() const { return _support; };
	bool validParameters(double mu, double lambda, double alpha, double beta);

	double mu() const { return _mu; }
	double lambda() const { return _lambda; }
	double alpha() const { return _alpha; }
	double beta() const { return _beta; }
	double gamma() const { return _gamma; }
	double normalizingConstant() const { return _normalizingConstant; }; 

private:
	double _normalizingConstant;
	double _mu, _lambda, _alpha, _beta, _gamma;
	const double _pi;
	std::pair<double, double> _support;
	VGFAsympExp _asympF;
	VGQuantileBounds _quantileBounds;

	std::pair<double, double> findSupport() const;

};

